/* ✅ 모든 요소 공통 설정 */
      * {
        box-sizing: border-box;   /* padding, border 포함해서 width 계산 */
        margin: 0;                /* 브라우저 기본 여백 제거 */
        padding: 0;               /* 브라우저 기본 안쪽 여백 제거 */
      }

      /* ✅ 전체 페이지에 적용할 기본 스타일 */
      body {
        background-color: #f8f9fa;             /* 연회색 배경 (Bootstrap 기본톤) */
        font-family: Arial, sans-serif;        /* 기본 폰트 (웹 안전 폰트) */
        padding: 0px;                         /* 페이지 바깥 여백 */
        font-size: 16px;                       /* 기본 글자 크기 */
        line-height: 1.6;                      /* 줄 간격 */
        color: #212529;                        /* 본문 글자 색상 (어두운 회색) */
      }

      /* ✅ a 태그(링크)의 기본 스타일 */
      a {
        color: #007bff;              /* 파란색 링크 */
        text-decoration: none;       /* 밑줄 제거 */
      }
      a:hover {
        text-decoration: underline;  /* 마우스 오버 시 밑줄 표시 */
      }

      /* ✅ 기본 제목 태그 (h1~h6) 여백 조정 */
      h1, h2, h3, h4, h5, h6 {
        margin-bottom: 0.75em;       /* 제목 아래 여백으로 글자와 글자 사이 공백 확보 */
        font-weight: bold;           /* 기본적으로 굵게 */
      }

      /* ✅ 단락(p) 기본 여백 설정 */
      p {
        margin-bottom: 1em;
      }

      /* ✅ 반응형 폰트 크기 조정 */
      /* 기본 (모바일 기준) */
      html {
        font-size: 16px;
      }
      body {
        font-size: 16px;
      }

      /* 📱 모바일 (최대 576px) 화면에 글자 크기  */
        @media (max-width: 576px) {  
        html {
          font-size: 16px;
        }
        body {
          font-size: 16px;
        }
        
      }

      /* 📱 모바일 (최대 767px) 화면에 글자 크기  */
      @media (max-width: 767px) {
        html {
          font-size: 16px;
        }
        body {
          font-size: 16px;
        }
      }

      /* 💻 태블릿 (768px ~ 1199px) 화면에 글자 크기  */
      @media (min-width: 768px) and (max-width: 1199px) {
        html {
          font-size: 17px;
        }
        body {
          font-size: 17px;
        }          
      }

      /* 🖥️ 데스크탑 (1200px 이상) 화면에 글자 크기 */
      @media (min-width: 1200px) {
        html {
          font-size: 18px;
          /* 웹 페이지 전체의 기준 글자 크기를 설정 모든 글꼴의 기준 크기가 18px로 설정됨 */
        }
        body {
          font-size: 18px; 
          /* body css로  안 일반 글자 18px에 적용을 받음 */
        }
        .navbar-nav {
          flex-wrap: nowrap;        /* 🔑 메뉴 항목 줄바꿈 방지 */
          overflow-x: auto;         /* 넘칠 경우 가로 스크롤 생성 */
        }
      }
      
        /* 네비게이션 메뉴 항목 글자 크기 */
      .navbar-nav .nav-link {
        font-size: 1rem;    /* 필요에 따라 0.8rem, 12px 등으로 조정 */
      }
    
      /* 상단 사용자 이름 표시 영역 글자 크기 */
      .navbar-text {
        font-size: 1rem;
      }

      /* 버튼 내 글자 크기 (선택적으로 적용) */
      .navbar .btn {
        font-size: 1rem;
      }

      /* 관리자 추천 방범 제품 목록 글자 크기 */
      #popularAbcPostList li {
        font-size: 15px;    /* 원하는 글자 크기로 조정 */
      }

      #popularAbcPostList a {
        font-size: 15px;    /* 링크 글자 크기도 따로 조정 */
      }


      /* 일반 추천 방범 제품 목록 글자 크기 */
      #popularProductList li {
        font-size: 15px;
      }

      #popularProductList a {
        font-size: 15px;
      }


      /* 유튜브 동영상 목록 글자 크기 */
      #popularVideoList li {
        font-size: 15px;
      }

      #popularVideoList a {
        font-size: 15px;
      }


      /* 업로드 동영상 목록 글자 크기 */
      #popularVideoUploadList li {
        font-size: 15px;
      }

      #popularVideoUploadList a {
        font-size: 15px;
      }


        /* ✅ 유튜브, 게시물, 상품 외곽 박스 강조 스타일 */
      .border-box {
        border: 1px solid #007bff;           /* 파란색 외곽선 */
        border-radius: 12px;                 /* 둥근 테두리 */
        background-color: #fff;              /* 배경은 흰색 */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);  /* 부드러운 그림자 효과 */
        margin-bottom: 30px;                 /* 아래쪽 공간 */
      }


      /* ✅ 다크 모드 전체 배경 및 글자색 */
      .dark-mode {
          background-color: #121212;     /* 어두운 배경 */
          color: #eee;                   /* 밝은 텍스트 */
      }

      /* ✅ 다크모드 - 카드 스타일 */
      .dark-mode .post-card {
          background-color: #1e1e1e;     /* 다크 카드 배경 */
          border-color: #444;            /* 어두운 테두리 */
      }

      /* ✅ 다크모드 - 입력창, 드롭다운 */
      .dark-mode .form-control,
      .dark-mode .form-select {
          background-color: #2c2c2c;     /* 입력창 배경 */
          color: #fff;                   /* 입력 텍스트 */
          border-color: #555;            /* 테두리 */
      }

      /* ✅ 다크모드 - 링크 색상 */
      .dark-mode a {
          color: #a3d8ff;                /* 하늘색 계열 링크 */
      }   

        .container {
          max-width: 600px;
          margin: 0 auto;
          padding: 20px;
          background: #ffffff;
          border-radius: 12px;
          box-shadow: 0 4px 8px rgba(0,0,0,0.05);
        }

        form {
          display: flex;
          flex-direction: column;
          gap: 15px;
        }

        label {
          font-weight: bold;
          margin-bottom: 5px;
        }

        input[type="text"],
        input[type="tel"],
        input[type="date"],
        input[type="file"],
        textarea {
          padding: 10px;
          border: 1px solid #ccc;
          border-radius: 6px;
          font-size: 16px;
        }

        textarea {
          resize: vertical;
          height: 100px;
        }

        /* ✅ 버튼 스타일: 고유 클래스 사용 */
        .as-submit-btn {
          background-color: #28a745;
          color: white;
          border: none;
          padding: 12px;
          font-size: 16px;
          border-radius: 6px;
          cursor: pointer;
          transition: background-color 0.3s ease;
        }

        .as-submit-btn:hover {
          background-color: #218838;
        }

        .info {
          font-size: 16px;
          color: #555;
          margin-top: 20px;
        }



        @media (max-width: 576px) {
          .container {
            padding: 15px;
          }

          input, textarea, button {
            font-size: 16px;
          }
        }

        /* 이미지 미리보기 */
        .image-preview {
          width: 100px;
          height: 100px;
          object-fit: cover;
          margin: 3px;
          border-radius: 4px;
          cursor: pointer;
          border: 1px solid #ccc;
        }   
        .photo-gallery {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            justify-content: flex-start;
        }

        .as-table td {
            vertical-align: middle; /* 셀 내용 중앙 정렬 */
        }


       .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        padding-top: 100px;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.9);
      }

      .modal.active {
        display: block;
      }

      .modal-content {
        margin: auto;
        display: block;
        max-width: 80%;
        max-height: 80%;
      }

      .close {
        position: absolute;
        top: 30px;
        right: 50px;
        color: white;
        font-size: 40px;
        font-weight: bold;
        cursor: pointer;
      }

      /* 테이블 스타일 */
      .as-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
        background-color: #f9fff9;
        font-size: 16px;
      }

      .as-table th, .as-table td {
        border: 1px solid #ccc;
        padding: 10px;
        text-align: center;
        vertical-align: middle;
      }

      .as-table thead {
        background-color: #3366cc;
        color: white;
      }

      .as-table tbody tr:nth-child(even) {
        background-color: #f2f2f2;
      }

      .as-table tbody tr:hover {
        background-color: #e6f7ff;
      }     
      
      
      /* 표 머리글과 본문 셀 기본 스타일 */
      #myInstallationTable th,
      #myInstallationTable td {
        vertical-align: middle;
        text-align: center;
        padding: 8px;
      }

      /* 각 열 너비 지정 (th와 td 모두 동일) */
      #myInstallationTable th:nth-child(1),
      #myInstallationTable td:nth-child(1) { width: 100px; } /* 고객명 */

      #myInstallationTable th:nth-child(2),
      #myInstallationTable td:nth-child(2) { width: 80px; } /* 연락처 */

      #myInstallationTable th:nth-child(3),
      #myInstallationTable td:nth-child(3) { width: 150px; } /* 제품명 / 회사명 */

      #myInstallationTable th:nth-child(4),
      #myInstallationTable td:nth-child(4) { width: 100px; } /* 시공일 */

      #myInstallationTable th:nth-child(5),
      #myInstallationTable td:nth-child(5) { width: 150px; } /* 시공 설명 */

      #myInstallationTable th:nth-child(6),
      #myInstallationTable td:nth-child(6) { width: 400px; } /* 첨부 사진 */

      #myInstallationTable th:nth-child(7),
      #myInstallationTable td:nth-child(7) { width: 100px; } /* 업로드일 */

    
      /* 첨부 사진 간격 띄우기 */
      #myInstallationTable td:nth-child(6) img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 4px;

        /* 여기가 간격 조정 부분 */
        margin: 4px 6px; /* 위아래 4px, 좌우 6px */
        display: inline-block;
      }    
      
      /* 사진 셀 공통 컨테이너 */
      .image-list {
        display: grid;
        grid-template-columns: repeat(3, 92px); /* 데스크탑 3열 */
        grid-auto-rows: 92px;
        gap: 8px;
        justify-content: center;
      }

      /* 썸네일 공통 */
      .image-list img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 6px;
        display: block;
        box-shadow: 0 1px 2px rgba(0,0,0,.08);
      }

      /* 태블릿 */
      @media (max-width: 768px) {
        .image-list {
          grid-template-columns: repeat(3, 84px);
          grid-auto-rows: 84px;
        }
      }

      /* 모바일: 2열, 화면폭 기준으로 유연 */
      @media (max-width: 576px) {
        .image-list {
          grid-template-columns: repeat(2, 42vw);
          grid-auto-rows: 42vw;
          gap: 8px;
        }
      }     
        
    

      /* 📱 [모바일 화면: 가로 576px 이하] */
      @media (max-width: 576px) {
        body {
          background-color: snow; /* 밝은 배경색으로 가독성 향상 (모바일 전용) */
        }
        .navbar .btn {
          font-size: 1rem;         /* 버튼 텍스트 크기 작게 조정 */
          padding: 0.3rem 0.6rem;    /* 버튼 안쪽 여백 줄여서 공간 확보 */
        }
        #searchInput {
          width: 100%;               /* 검색창을 전체 너비로 확장 */
        }  

        .post-card {
          width: 100%;
          max-width: 300px;
          margin: auto;
        }
        /* 📌📌📌 추가 📌📌📌광고 배너 이미지 크기 조절하기 공통 이미지 제한 */
        .right-content img {
            max-width: 300px;
            width: 100%;
          } 
          
        
      }

      /* 📱💻 [태블릿 화면: 가로 577px ~ 768px] */
      @media (min-width: 577px) and (max-width: 768px) {
        body {
          background-color: whitesmoke; /* 태블릿 전용 배경색 */
        } 
        
        .post-card {
          width: 100%;
          max-width: 300px;
          margin: auto;
        }
        /* 📌📌📌 추가 📌📌📌광고 배너 이미지 크기 조절하기 공통 이미지 제한 */
        .right-content img {
            max-width: 300px;
            width: 100%;
          }        
       }      
      

      /* 💻 [노트북/중간 해상도: 가로 769px ~ 1199px] */
      @media (min-width: 769px) and (max-width: 1199px) {
        body {
          background-color: seashell; /* 중간 화면 전용 배경색 */
        }         
        .navbar-text {
          display: none;             /* 텍스트 요소 숨김 (공간 절약) */
        }
        .post-card {
          width: 100%;
          max-width: 400px;
          margin: auto;
        }
        /* 📌📌📌 추가 📌📌📌광고 배너 이미지 크기 조절하기 공통 이미지 제한 */
        .right-content img {
            max-width: 300px;
            width: 100%;
          }           
      }

      /* 🖥️ [데스크탑/대형 화면: 가로 1200px 이상] */
      @media (min-width: 1200px) {
        body {
          background-color: honeydew; /* 데스크탑 전용 배경색 */
        }  
        
        .post-card {
          width: 100%;
          max-width: 400px;
          margin: auto;
        }
        .navbar-text {
          font-size: 1rem;           /* 네비게이션 텍스트 크기 조정 */
          display: inline-block;     /* 텍스트 보이도록 설정 */
        }
        /* 📌📌📌 추가 📌📌📌광고 배너 이미지 크기 조절하기 공통 이미지 제한 */
        .right-content img {
            max-width: 300px;
            width: 100%;
          }
      }