body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    font-size: 12px;
    color: #333;
    height: 100%; /* Ensure full height for the body */
    min-height: 100vh; /* Ensure the body stretches to at least the full viewport */
    overflow-x: hidden; /* Prevent horizontal scroll on the body */
    overflow-y: auto; /* Enable smooth vertical scrolling */
    display: flex;
    flex-direction: column;
}


.home {
    display: grid;
    grid-template-rows: 50px 1fr 50px; /* Top bar, content, bottom bar */
    grid-template-columns: 50px 1fr 50px; /* Left bar, content, right bar */
    height: 100vh;
    gap: 0; /* No gaps between grid items */
    overflow-y: hidden;
}
.disegnini-container {
    display: grid;
    grid-template-rows: 50px 1fr 50px; /* Top bar, content, bottom bar */
    grid-template-columns: 50px 1fr 1fr 1fr 50px; /* Left sidebar, disegnini-info, phone, details, right sidebar */
    height: 100vh;
    gap: 0; /* No gaps between grid items */
}

.disegnini-info-mobile{
    display: none;
}
.disegnini-info {
    grid-row: 2 / 3;
    grid-column: 2 / 3; /* Occupies the left column next to the phone */
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers the content */
    align-items: flex-start;
    height: 100%; /* Ensures the info section takes up the full height */
    text-align: justify;
    line-height: 2;
        
    
}

.details-info {
    grid-row: 2 / 3;
    grid-column: 4 / 5; /* Occupies the right column next to the phone */
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers the content */
    align-items: flex-start;
    height: 100%; /* Ensures the details section takes up the full height */
    
}


.details-info select {
    width: 100%; /* Full width */
    padding: 8px;
    margin-bottom: 20px; /* Add space between the selector and author details */
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.details-info label {
    font-weight: bold;
    margin-bottom: 5px; /* Space below the label */
}



/* Global Sidebar Styling */
.sidebar-left, .sidebar-right {
    display: flex;
    flex-direction: column;
    justify-content: center;  /* Centers the content vertically */
    align-items: center;
    background-color: #fff;
    color: #333;
    height: 100vh; /* Make sure it takes up full viewport height */
    position: fixed; /* Keep the sidebar fixed on the screen */
    top: 0;
    width: 50px; /* Adjust the width as needed */
}

/* Sidebar Left */
.sidebar-left {
    left: 0; /* Stick to the left */
}

/* Sidebar Right */
.sidebar-right {
    right: 0; /* Stick to the right */
}

.bottom-bar {
    grid-column: 1 / 6; /* Span all five columns */
    margin-bottom: 0; /* Reset margin if needed */
    position: fixed;      
    bottom: 0px;
    width: 100%;  
    background-color: #fff;
    color: #333;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}


#svgTitle {
    width: auto; /* Adjust this value as needed */
    height: auto; /* Maintain aspect ratio */
    max-width: 100%;
    object-fit: contain;
}

a.svgLink {
  position: relative;
  display: inline-block;
  width:50%;
  height:auto;
}

a.svgLink:after {
  content: ""; 
  position: absolute; 
  top: 0; 
  right: 0; 
  bottom: 0; 
  left: 0;
    
}


.background {
    grid-row: 2 / 3; /* Only content area */
    grid-column: 2 / 3;
    position: relative;
    overflow: hidden;
}
#svgHome {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.language-item {
    margin: 20px 10px;
    color: #333;
    text-decoration: none;
    font-size: 1.2em;
}

.language-item:hover, .social-item:hover {
    color: #ddd;
    cursor: pointer;
}

 .language-item.active {            
     font-weight: bold;
     color: #ca0021;
}

.social-item {
    margin: 20px 0;
    color: #333;
    text-decoration: none;
    font-size: 1.5em; /* Increase the size of the icons */
}

.phone {
    grid-row: 2 / 3;
    grid-column: 3 / 4; /* The phone occupies the center column */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Allow absolute positioning inside */
    margin-top: -20px; /* Adjust to align it slightly upwards */
}

.theme-selector {
    position: absolute;
    top: 10px; /* Adjust this value to control how close the selector is to the top of the phone */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.theme-selector label {
    font-weight: bold;
    margin-bottom: 5px; /* Space between label and dropdown */
}

.theme-selector select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
    width: 150px; /* Adjust width if necessary */
    text-align: center; /* Center the text inside the dropdown */
}

#svgPhone {
    width: 100%;
    height: auto;
    transform: scale(0.7); /* Adjust the scale as needed */
    transform-origin: center;
    object-fit: contain;
    max-width: 400px; /* Adjust the max-width */
    max-height: 600px; /* Adjust the max-height */
}

.scroll-arrow {
    background-color: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

#left-arrow {
    left: 40px;
}

#right-arrow {
    right: 40px;
}



.lightbox {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            justify-content: center;
            align-items: center;
        }

        .lightbox img {
            max-width: 90%;
            max-height: 80%;
            margin-bottom: 10px;
        }

        .lightbox-info {
            color: white;
            text-align: center;
        }

        .lightbox-info a {
            color: #00f;
            text-decoration: underline;
        }

        .close-lightbox {
            position: absolute;
            top: 10px;
            right: 20px;
            font-size: 30px;
            color: white;
            cursor: pointer;
        }

/* Instagram Icon */
.fab.fa-instagram {
    color: #e4405f; /* Instagram's official color */
    margin-right: 5px;
    font-size: 16px; /* Adjust the icon size */
}

/* Facebook Icon */
.fab.fa-facebook-f {
    color: #1877F2; /* Facebook's official color */
    margin-right: 5px;
    font-size: 16px; /* Adjust the icon size */
}

/* General link styling */
a {
    text-decoration: none;
    color: inherit; /* Ensures link text uses the same color as the surrounding text */
}

a:hover .fab.fa-instagram, a:hover .fab.fa-facebook-f {
    opacity: 0.4; /* Optional hover effect */
}


/* Content Flex Layout for SVG and Text */
.info-content {
    display: flex;
    justify-content: flex-start;      /* Align both SVG and text to the start */
    align-items: center;              /* Vertically center the content */
    padding: 20px;
    height: calc(100vh - 50px);       /* Height adjusted for the bottom bar */
    gap: 40px;                        /* Space between the SVG and the text */
    overflow: hidden;
}

/* Left section for the profile SVG */
.profile-section {
    flex: 1;                          /* Give SVG section equal space */
    display: flex;
    justify-content: center;          /* Center the SVG horizontally */
    align-items: center;              /* Center the SVG vertically */
}

/* Scale the SVG and adjust its position */
.profile-section object {
    transform: scale(1.9);            /* Scale the SVG */
    transform-origin: center;         /* Ensure scaling happens from the center */
    width: 100%;                      /* Make the SVG responsive */
    height: auto;                     /* Maintain aspect ratio */
    max-width: 300px;                 /* Control maximum width */
}

/* Right section for the text box */
.info-textbox {
    flex: 1;                          /* Textbox takes up equal space */
    display: flex;
    justify-content: flex-start;      /* Align text to the left, closer to the SVG */
    align-items: center;              /* Vertically center the text */
    padding-right: 20px;              /* Optional: Add padding on the right */
}

/* Textbox content */
.textbox {
    max-width: 500px;                 /* Limit the width of the text */
    font-size: 0.9rem;                  /* Standard font size */
    line-height: 1.6;                 /* Improve readability */
    text-align: justify;
}


/* General container for the Panda page */
.panda-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

/* Flexbox layout for the frames and text */
.panda-content {
    display: flex;
    max-width: 1200px;
    width: 100%;
    /*gap: 20px; /* Space between the two sections (frames and text) */
    height: 100vh;
}

/* Left section for frames */
.panda-section {
    display: flex;
    flex-wrap: wrap;                /* Allow the frames to wrap on smaller screens */
    justify-content: flex-start;    /* Align frames to the left */
    flex: 2;                        /* Take up 2/3 of the width */
    /*gap: 10px;      */                /* Reduce the gap between frames */
    overflow-y: auto;               /* Make the frames scrollable */
    padding: 20px 10px 60px 20px;      /* Reduce padding */
    height: calc(100vh - 20px);     /* Adjust height to fit the viewport better */
    box-sizing: border-box;         /* Ensure padding is included in width */
}

/* Style for the individual frame objects (SVG) */
.panda-section object {
    width: 180px;                   /* Slightly reduce the width of each frame */
    height: 210px;
    transition: opacity 1s ease-in-out;
}

/* Frame container for each SVG and its description */
.frame-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 180px;               /* Match the container width with the frame */
    margin-bottom: 10px;            /* Reduce space between the image and text */
}

/* Add a fade-in effect when the image is displayed */
.frame-container img {
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.frame-container img.visible {
    opacity: 1;
}

/* Text below each frame */
.image-text {
    margin-top: 5px;                /* Reduce space between image and text */
    font-size: 0.9rem;
    color: #333;
    text-align: center;
}

/* Right section for textbox */
.panda-textbox {
    flex: 1;                         /* Take up 1/3 of the width */
    display: flex;
    flex-direction: column;           /* Stack title above text */
    align-items: flex-start;          /* Align items to the left */
    position: sticky;                /* Make the textbox sticky */
    top: 0;                          /* Stick to the top */
    max-height: calc(100vh - 40px);  /* Set a maximum height to allow scrolling */
    margin-left: 10px;
    margin-right: 10px;
    overflow-y: auto;                /* Enable vertical scrolling */
    padding: 20px;                   /* Add padding for better readability */
    box-sizing: border-box;          /* Include padding in width calculation */
}

/* Ensure the title remains visible */
.panda-title {
    flex-shrink: 0;                  /* Prevent shrinking of the title */
    font-size: 2rem;                 /* Adjust size as needed */
    font-weight: bold;
    margin-bottom: 10px;             /* Space between title and text */
    color: #333;
}

/* Textbox with description */
.panda-text {
    max-width: 500px;                 /* Limit the width of the text */
    font-size: 0.9rem;                  /* Standard font size */
    line-height: 1.6;                 /* Improve readability */
    text-align: justify;        /* Align text to the left */
    padding-right: 20px;             /* Add right padding to balance the text */
}

/* Mobile-specific scaling */
@media only screen and (max-width: 768px) {
    .background object {
        width: 100%;      /* Take up the full width on mobile */
        height: auto;     /* Maintain aspect ratio */
        max-width: none;  /* Remove max width for mobile */
    }
    
    .background {
        grid-row: 1 / -1; /* Cover all rows, including top-bar and bottom-bar */
        grid-column: 1 / -1; /* Cover all columns, including sidebars */
        position: absolute; /* Position the background within the grid */
        top: 0;
        left: 0;
        width: 100%; /* Ensure full-width background */
        height: 100%; /* Ensure full-height background */
        z-index: -1; /* Keep it behind the content */
        overflow: hidden;
    }

    #svgHome {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Make sure the SVG fits nicely within the container */
        }
        .top-bar {
        display: flex; 
        justify-content: center;
        align-items: center;
        padding-top: 15px;
        background-color: #fff;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        background:none;*/
        /*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);*/
    }
}

.home{
    overflow:hidden;
}


/* Hamburger menu icon */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 34px;
    height: 23px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Mobile menu (hidden by default) */
.mobile-menu {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    width: 100%;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mobile-menu.open {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Menu items */
.mobile-menu ul {
    list-style: none;
    padding: 100px 0; /* Add space at the top of the menu */
    text-align: center;
}

.mobile-menu ul li {
    margin-bottom: 80px; /* Increase space between the menu items */
}

.mobile-menu ul li a {
    text-decoration: none;
    color: #333;
    font-size: 28px; /* Increase font size */
    opacity: 1; /* Ensure full opacity for text */
}

.mobile-menu ul li a:hover {
    color: #ca0021;
}

/* Hamburger to cross animation */
.hamburger-menu.cross .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.cross .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.cross .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Media queries for mobile */
@media (max-width: 768px) {
body{
    font-size:0.9rem;
}


    /* Adjust the main container grid for mobile */
    .disegnini-container {
        display: block;
        padding: 0;
        margin-top:50px;
        width: 100%;
        height: auto;  /* Allow auto height */
    }

        /* Adjust phone SVG for mobile */
    .phone {
        display: flex;
        flex-direction: column;
        width: 100%;  /* Full width */
        margin-top:20px; 
        margin-bottom:0;
        text-align: center; /* Center content */
        position: relative; /* Position relative to the page */
        justify-content: center;
    }

    .sidebar-left, .sidebar-right{
         background: transparent;
        /*justify-content:flex-start;*/
        top:50px;
        z-index: 100;
    }
    
    .disegnini-info{
        display: none;
    }

    .disegnini-info-mobile {
        display: block;
        margin: 50px 40px 80px 40px;  /* Increase the bottom margin to avoid overlap */
        text-align: justify;
        line-height: 1.5;  /* Adjust line-height to reduce space between lines */

    }
        .textbox-mobile,.disegnini-title-mobile{
        margin:10px 10px 10px 10px;
    }

    .details-info {
        display: block;
        text-align: center;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 20px;  /* Reduce bottom margin */
        height: auto;  /* Ensure auto height */
        margin-top: -60px;
    }

    .bottom-bar {
        position: fixed;
        bottom: 0;
        width: 100%;
        z-index: auto;  /* Ensure it stays above other content */
        height: 50px;  /* Set a specific height for the bar */
       /* background-color: #fff;*/
    }
    
    .panda-container{
        display:block;
        margin-top:20px;
        /*overflow: scroll;*/
    }
    
    .panda-content {
        flex-direction: column; /* Stack frames and text */
        height: auto; /* Let height adjust to content */
        gap: 0;
    }

    .panda-section {
        display: flex;
        flex-wrap:nowrap;
        flex-direction: row; /* Arrange frames in a single row */
        gap: 10px; /* Space between frames */
        overflow-x: scroll; /* Enable horizontal scroll */
        scroll-snap-type: x mandatory; /* Snap to each image */
        padding: 10px;
        width: 100%; /* Full width */
        box-sizing: border-box;
    }

    .panda-text {
        padding-right: 0;
        max-width: 100%; /* Allow text to take full width */
    }
    .panda-section object {
        width: 280px;
        height: 210px;
        /*transition: opacity 2s ease-in-out;*/
    }

   .frame-container {
        flex-shrink: 0; /* Prevent frames from shrinking */
        width: 180px; /* Set fixed width for each frame */
        margin-bottom: 10px;
        scroll-snap-align: start; /* Align frames on scroll */
    }

    .image-text {
        font-size: 1.2rem; /* Slightly increase font size */
        text-align: center; /* Ensure text is centered under the frame */
    }

    .panda-textbox {
        margin-top: 20px;
        padding: 0 20px; /* Add padding for readability */
        text-align: justify;
        margin-bottom: 20px;
        margin-left:10px;
        margin-right:10px;
        height: auto; /* Allow auto height */
    }
    
      .info-content {
        flex-direction: column;
        display:block;
        overflow:scroll;
        overflow-x: hidden;
        gap: 20px; /* Space between the stacked sections */
        padding: 0; /* Remove padding */
        padding-top:25px;
        

    }

    .profile-section{
        display:block;
        
    }

    .profile-section object {
       transform:scale(1.3);
    }

    .info-textbox {
       padding-left: 30px;
        padding-right: 30px;
        padding-bottom: 20px;
        text-align: center;
        margin-bottom: 20px;
    }

    .textbox {
        font-size: 1rem; /* Slightly increase font size for readability */
        padding: 0 20px;
        max-width: 100%; /* Ensure the text takes up full width */
        line-height: 1.6;
    }
    
        #svgProfile{
        padding-left:33px;
    }
}

@media (min-width: 1600px) {
    .details-info, .textbox, .theme-selector, .panda-text {
        font-size:1rem;
    }
    .disegnini-title,.panda-title{
        font-size:2.3em;
    }

    .disegnini-info{
        overflow-y:scroll;
    }




