/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #ffffff;
    --text-color: #ffffff;
    --light-text: #888888;
    --background: #000000;
    --section-bg: #111111;
    --card-bg: #111111;
    --border-color: #222222;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
    position: relative;
    min-height: -webkit-fill-available;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    background: linear-gradient(45deg, #1a1a1a 25%, #222222 50%, #1a1a1a 75%);
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Viewport height fix for mobile */
@supports (-webkit-touch-callout: none) {
    .min-h-screen {
        min-height: -webkit-fill-available;
    }
}

/* Section Base Styles */
section {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 max(1rem, 5vw);
    position: relative;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 1.5rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
    text-decoration: none;
}

.logo span {
    display: block;
    white-space: nowrap;
}

.logo-img {
    height: 3.5rem;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: var(--light-text);
}

.login-btn {
    background: var(--text-color);
    color: var(--background) !important;
    padding: 0.8rem 1.8rem;
    border-radius: 0;
    transition: all 0.3s ease !important;
}

.login-btn:hover {
    background: var(--light-text) !important;
    transform: translateY(-2px);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
}

/* Hero Section */
.hero {
    padding: 0;
    height: 100vh;
    height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    padding-top: 4.5rem; /* Add padding-top to account for navbar height */
}

.scroll-gallery {
    width: 100%;
    height: 53vh;
    overflow: visible;
    position: relative;
    background: var(--background);
    padding: 2rem 0;
}

.gallery-track {
    display: flex;
    width: max-content;
    height: 100%;
    animation: scroll 30s linear infinite;
    will-change: transform;
    gap: 2rem;
    margin-top: 0;
    padding: 0 2rem;
}

.gallery-item {
    width: 25vw;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: 0;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.3s ease;
    border-radius: 30px;
}

.gallery-item:hover::before {
    background: rgba(0, 0, 0, 0.3);
}

.gallery-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.gallery-item:hover .gallery-content {
    opacity: 1;
    transform: translateY(0);
}

.gallery-content h2 {
    font-size: clamp(1.2rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-content p {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: var(--text-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-25vw * 4 - 6rem)); /* Adjust based on item width and gap */
    }
}

.hero-main {
    padding: 100px 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: min(2rem, 4vh);
    color: var(--text-color);
    font-weight: 800;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--light-text);
    margin-bottom: min(3rem, 6vh);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Services Section */
.services {
    padding: min(120px, 15vh) 0;
    background: var(--section-bg);
}

.services:nth-of-type(2) {
    background: #ffffff;
}

.services:nth-of-type(2) h2,
.services:nth-of-type(2) h3,
.services:nth-of-type(2) p,
.services:nth-of-type(2) i {
    color: #000000;
}

.services:nth-of-type(2) .service-card {
    background: #ffffff;
    border-color: #e0e0e0;
}

.services:nth-of-type(2) .service-card:hover {
    border-color: #000000;
}

.services:nth-of-type(2) .section-subtitle {
    color: #666666;
}

.services h2 {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 800;
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    color: var(--light-text);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    margin-bottom: min(4rem, 8vh);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: min(2rem, 4vw);
}

.service-card {
    padding: min(2rem, 4vw);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--text-color);
}

.service-card i {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-color);
    font-weight: 700;
}

.service-card p {
    color: var(--light-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.learn-more {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.learn-more:hover {
    gap: 1rem;
}

/* About Section */
.about {
    padding: 120px 0;
    background: var(--background);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--light-text);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-features {
    display: grid;
    gap: 1rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

.feature i {
    color: var(--text-color);
    font-size: 1.2rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.stat h3 {
    font-size: 3rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

/* Contact Section */
.contact {
    padding: 120px 0;
    background: var(--section-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--text-color);
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.info-item i {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-top: 0.2rem;
}

.info-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--background);
    color: var(--text-color);
    padding: 100px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section a {
    color: var(--light-text);
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--text-color);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--light-text);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--light-text);
}

/* Common Elements */
.cta-button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background: var(--text-color);
    color: var(--background);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background: var(--light-text);
    transform: translateY(-2px);
}

.cta-button.secondary {
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
}

.cta-button.secondary:hover {
    background: var(--text-color);
    color: var(--background);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navigation */
    .navbar {
        padding: 1rem 0;
    }

    .logo {
        gap: 0.5rem;
    }

    .logo span {
        display: block;
        font-size: 1rem;
        white-space: nowrap;
    }

    .logo-img {
        height: 2.5rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: block;
        position: relative;
        z-index: 1000;
    }

    /* Hero Section Mobile Styles */
    .hero {
        padding-top: 3.5rem; /* Adjust padding-top for mobile navbar height */
        min-height: 100vh;
        justify-content: flex-start;
    }

    .scroll-gallery {
        height: 35vh;
        padding: 1.5rem 0;
        margin-top: 0;
    }

    .gallery-track {
        gap: 1rem;
        margin-top: 0;
        padding: 0 1.5rem;
    }

    .gallery-item {
        width: 85vw;
        margin: 0;
    }

    .gallery-content {
        opacity: 1;
        transform: none;
    }

    .gallery-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .gallery-content p {
        font-size: 0.9rem;
    }

    @keyframes scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-85vw * 4 - 4rem));
        }
    }

    .hero-main {
        padding: 40px 0;
    }

    .hero-content {
        padding: min(1rem, 2vh) max(1rem, 3vw);
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
        padding: 0;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0;
    }

    /* Products Section */
    .services {
        padding: min(40px, 8vh) 0;
    }

    .services h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .service-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    /* Container adjustments */
    .container {
        padding: 0 1.5rem;
    }

    .logo span {
        display: block;
        font-size: 1rem;
        white-space: nowrap;
    }

    .logo-img {
        height: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }

    /* About Section Mobile Styles */
    .about {
        padding: 60px 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-features {
        gap: 0.8rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat {
        padding: 1.5rem;
    }

    .stat h3 {
        font-size: 2.5rem;
    }

    /* Contact Section Mobile Styles */
    .contact {
        padding: 60px 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .info-item {
        padding: 1rem;
    }

    #c3 iframe {
        height: 600px;
    }

    /* Footer Mobile Styles */
    .footer {
        padding: 60px 0 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Cursor Styles for Mobile */
    .cursor, .cursor-inner {
        display: none;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .navbar {
        padding: 0.8rem 0;
    }

    .logo-img {
        height: 2rem;
    }

    .logo span {
        font-size: 0.9rem;
    }

    .scroll-gallery {
        height: 30vh;
        padding: 1rem 0;
    }

    .gallery-track {
        padding: 0 1rem;
    }

    .gallery-item {
        width: 90vw;
        margin: 0;
    }

    .gallery-content h2 {
        font-size: 1.3rem;
    }

    .gallery-content p {
        font-size: 0.8rem;
    }

    @keyframes scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-90vw * 4 - 4rem));
        }
    }

    .hero {
        padding-top: 3rem; /* Adjust padding-top for smaller mobile navbar height */
    }

    .hero-content h1 {
        font-size: clamp(1.8rem, 5vw, 2rem);
    }

    .services h2 {
        font-size: clamp(1.6rem, 4vw, 1.8rem);
    }

    .stat h3 {
        font-size: 2rem;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .gallery-item {
        width: 40vw;
    }

    .logo span {
        display: block;
        font-size: 1.2rem;
    }

    .logo-img {
        height: 3rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.service-card,
.about-content,
.contact-content {
    animation: fadeIn 0.8s ease-out;
}

/* Thank You Page */
.thank-you {
    padding: 150px 0 100px;
    text-align: center;
    background: var(--section-bg);
}

.thank-you-content {
    max-width: 600px;
    margin: 0 auto;
}

.thank-you-content i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.thank-you-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.thank-you-content p {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 2rem;
}

/* New Form Styling */
#form-app {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: none;
}

#form-app .form-group {
    position: relative;
    border: none;
}

#form-app .form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

#form-app .form-control,
#form-app .form-select {
    width: 100%;
    padding: 1.2rem;
    background: #ffffff;
    border: none !important;
    color: #000000;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    outline: none;
}

#form-app .form-control:focus,
#form-app .form-select:focus {
    outline: none;
    box-shadow: none;
    border: none !important;
    background: #ffffff;
    color: #000000;
}

#form-app .form-control::placeholder {
    color: #666666;
}

#form-app .form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
    padding-right: 2.5rem;
    border: none !important;
    background-color: #ffffff;
}

#form-app .form-action {
    margin-top: 1rem;
    border: none;
}

#form-app .btn-primary {
    width: 100%;
    padding: 1.2rem;
    background: var(--text-color);
    color: var(--background);
    border: none;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

#form-app .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#form-app .button-loading {
    display: none;
}

#form-app .btn-primary:disabled .button-text {
    display: none;
}

#form-app .btn-primary:disabled .button-loading {
    display: inline-block;
}

#form-app .fa-spinner {
    margin-right: 0.5rem;
}

#form-app textarea.form-control {
    min-height: 150px;
    resize: vertical;
    background: #ffffff;
    border: none !important;
    outline: none;
    color: #000000;
}

#form-app fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

#form-app .row {
    border: none;
    margin: 0;
    padding: 0;
}

#form-app .col-12 {
    border: none;
    padding: 0;
    margin: 0;
}

#form-app .form-select option {
    background: #ffffff;
    color: #000000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #form-app .form-control,
    #form-app .form-select {
        padding: 1rem;
    }
    
    #form-app .btn-primary {
        padding: 1rem;
    }
}

/* Card Savvy Forms Widget Styles */
#c3 {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: var(--section-bg);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

#c3 iframe {
    width: 100%;
    height: 527px;
    border: none;
    background: var(--section-bg);
}

#c3 a {
    display: none;
}

/* Contact Section Layout */
.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #c3 {
        margin: 0;
        padding: 0;
    }

    #c3 iframe {
        height: 600px; /* Taller on mobile for better form visibility */
    }

    .contact {
        padding: 80px 0; /* Reduce padding on mobile */
    }

    .contact .container {
        padding: 0 1rem; /* Reduce container padding on mobile */
    }

    .info-item {
        padding: 1rem; /* Reduce padding for contact info items */
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    #c3 iframe {
        height: 650px; /* Even taller on smaller devices */
    }

    .contact-content {
        gap: 1.5rem;
    }
}

/* Fix for notched phones */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Add after your existing CSS */
.centerflipcards {
    display: block;
    width: 1330px;
    height: auto;
    text-align: center;
    margin: 0 auto;
    margin-top: 25px;
}

.square-flip {
    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;
    -webkit-transform: perspective(1000px);
    -moz-transform: perspective(1000px);
    -ms-transform: perspective(1000px);
    transform: perspective(1000px);
    -webkit-transform-style: preserve-3d; 
    -moz-transform-style: preserve-3d; 
    -ms-transform-style: preserve-3d; 
    transform-style: preserve-3d; 
    position: relative;
    float: left;
    margin: 20px;
    width: 256px;
    height: 256px;
}

.square, .square2 {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background-color: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.square {
    background-size: cover;
    background-position: center center;
    -ms-transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    -webkit-transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    overflow: hidden;
    position: absolute;
    top: 0;
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
}

.square-flip .square {
    -webkit-transform: rotateY(0deg);
    -moz-transform: rotateY(0deg);
    -o-transform: rotateY(0deg);
    -ms-transform: rotateY(0deg);
    transform: rotateY(0deg);
    transform-style: preserve-3d;
    z-index: 1;
}

.square-flip:hover .square {
    -webkit-transform: rotateY(-180deg);
    -moz-transform: rotateY(-180deg);
    -o-transform: rotateY(-180deg);
    -ms-transform: rotateY(-180deg);
    transform: rotateY(-180deg);
    transform-style: preserve-3d;
}

.square2 {
    background-size: cover;
    background-position: center center;
    -ms-transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    -webkit-transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    overflow: hidden;
    position: absolute;
    top: 0;
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
}

.square-flip .square2 {
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    -o-transform: rotateY(180deg);
    -ms-transform: rotateY(180deg);
    transform: rotateY(180deg);
    transform-style: preserve-3d;
    z-index: 1;
}

.square-flip:hover .square2 {
    -webkit-transform: rotateY(0deg);
    -moz-transform: rotateY(0deg);
    -o-transform: rotateY(0deg);
    -ms-transform: rotateY(0deg);
    transform: rotateY(0deg);
    transform-style: preserve-3d;
}

.square-container {
    padding: 40px;
    text-align: center;
    position: relative;
    top: 50%;
    -ms-transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    -webkit-transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    -webkit-transform: translateY(-50%) translateX(0px) scale(1);
    -ms-transform: translateY(-50%) translateX(0px) scale(1);
    transform: translateY(-50%) translateX(0px) scale(1);
    transform-style: preserve-3d;
    z-index: 2;
}

.square-flip:hover .square-container {
    -webkit-transform: translateY(-50%) translateX(-650px) scale(.88);
    -ms-transform: translateY(-50%) translateX(-650px) scale(.88);
    transform: translateY(-50%) translateX(-650px) scale(.88);
    transform-style: preserve-3d;
}

.square-container2 {
    padding: 40px;
    text-align: center;
    position: relative;
    top: 50%;
    -ms-transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    -webkit-transition: transform 0.60s cubic-bezier(.5,.3,.3,1);
    -webkit-transform: translateY(-50%) translateX(650px) translateZ(60px) scale(.88);
    -ms-transform: translateY(-50%) translateX(650px) translateZ(60px) scale(.88);
    transform: translateY(-50%) translateX(650px) translateZ(60px) scale(.88);
    transform-style: preserve-3d;
    z-index: 2;
}

.square-flip:hover .square-container2 {
    -webkit-transform: translateY(-50%) translateX(0px) translateZ(0px) scale(1);
    -ms-transform: translateY(-50%) translateX(0px) translateZ(0px) scale(1);
    transform: translateY(-50%) translateX(0px) translateZ(0px) scale(1);
    transform-style: preserve-3d;
}

.flip-overlay {
    display: block;
    background: white;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    border-radius: 20px;
}

.square-flip h2 {
    color: black;
    font-family: "Open Sans";
    font-weight: 700;
    font-size: 22px;
}

.square-flip h3 {
    color: black;
    font-family: "Open Sans";
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
}

.square-flip .align-center i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: black;
}

.kallyas-button {
    display: block;
    width: 160px;
    padding: 18px 30px;
    font-family: "Open Sans";
    font-weight: 600;
    color: #fff;
    margin: 0 auto;
    border-radius: 2px;
    text-decoration: none;
    background: linear-gradient(135deg, #6FB1FC 0%, #4364F7 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.kallyas-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.clearfix {
    clear: both;
}

@media (max-width: 1300px) {
    .square-flip {
        width: calc(50% - 20px);
        height: 300px;
    }
}

@media (max-width: 768px) {
    .square-flip {
        width: calc(100% - 20px);
        height: 300px;
    }
}

/* Tablet Screens */
@media (max-width: 1200px) {
    .centerflipcards {
        width: 100%;
        padding: 0 20px;
        height: auto;
    }
    
    .square-flip {
        width: calc(50% - 40px); /* 2 cards per row */
        margin: 20px;
    }
}

/* Mobile Screens */
@media (max-width: 768px) {
    .centerflipcards {
        width: 100%;
        padding: 0 20px;
        height: auto;
        overflow: visible;
    }
    
    .square-flip {
        width: calc(100% - 40px);
        margin: 20px auto;
        float: none;
        display: block;
    }

    /* Adjust text sizes for mobile */
    .square-flip h2 {
        font-size: 20px;
    }

    .square-flip h3 {
        font-size: 14px;
        line-height: 22px;
    }

    .square-flip .align-center i {
        font-size: 2.5rem;
    }

    .kallyas-button {
        width: 140px;
        padding: 15px 25px;
    }
}

/* Small Mobile Screens */
@media (max-width: 480px) {
    .square-flip {
        height: 240px; /* Slightly smaller height for very small screens */
    }
} 